RageLeague Posted September 19, 2021 Share Posted September 19, 2021 I am trying to add a sequencer equivalent (restore all charges to an item anywhere in your deck) in negotiation. For some reason, it will either show a card on the screen that can never go away or be played (if you choose a card from hand, unlike in battle), or it just hard crash the game (when trying to do something like card:TransferCard(minigame.trash_deck) on the chosen card). There seem to be some issues. Link to comment Share on other sites More sharing options...
Developer rooks Posted September 20, 2021 Developer Share Posted September 20, 2021 Do you think you could post or DM me the script for the card? I can try reproducing the issue and possibly resolve what's happening. Link to comment Share on other sites More sharing options...
RageLeague Posted September 24, 2021 Author Share Posted September 24, 2021 Okay, here is the replicated card sequencer_negotiation = { name = "Sequencer", flavour = "'Universal energy my friend, that's what the blue is all about.'", desc = "Restore all uses to an item card in your hand.", icon = "battle/sequencer.tex", item_tags = ITEM_TAGS.UTILITY, rarity = CARD_RARITY.UNCOMMON, cost = 1, max_charges = 3, battle_counterpart = "sequencer", flags = CARD_FLAGS.REPLENISH | CARD_FLAGS.EXPEND, GetCardsOwnedBySelf = function(self) if self.negotiator:IsPlayer() and self.engine then return table.merge( self.engine.hand_deck.cards, self.engine.discard_deck.cards, self.engine.draw_deck.cards ) end -- return self.engine:GetHandDeck() end, CanPlayCard = function( self, card, engine, target ) if not self:GetCardsOwnedBySelf() then return false, CARD_PLAY_REASONS.NO_VALID_TARGETS end for i, card in ipairs(self:GetCardsOwnedBySelf()) do if card:IsPartiallySpent() then return true end end return false, CARD_PLAY_REASONS.NO_VALID_TARGETS end, OnPostResolve = function( self, minigame, targets ) local card = minigame:ChooseCardsFromTable( self:GetCardsOwnedBySelf(), 1, 1, Negotiation.Card.IsPartiallySpent, LOC "CARD_ENGINE.CHOOSE_SPENT_CARD", self )[1] if card then local original_deck = card.deck original_deck:RemoveCard(card) -- card:TransferCard(minigame.trash_deck) -- minigame:GetTrashDeck():InsertCard( card ) card:RestoreCharges() -- card.show_dealt = false -- minigame:DealCard( card, original_deck ) card:TransferCard(original_deck) -- card:NotifyChanged() end end, }, Link to comment Share on other sites More sharing options...
Developer rooks Posted September 27, 2021 Developer Share Posted September 27, 2021 I managed to reproduce both those issues (card remaining on screen, and hard crash) and will be pushing through the fixes, first on experimental, in the coming days. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.