Fluorohydride / ygopro-pre-script

90 stars 110 forks source link

Scripting "Lair of Darkness" #173

Open EerieCode opened 6 years ago

EerieCode commented 6 years ago

Since I saw @mercury233 uploaded a first draft of the card, I figured it'd be as good a time as any to ask: any plan on how to proceed with "Lair of Darkness"'s Tribute substitution? The plan I had involved something similar to what was done for "Temple of the Elemental Lords", having the field apply a particular effect to all valid cards (in this case, all DARK monsters the opponent controls) and then using a flag to handle the "once per turn" clause. After that, we'd have to update all cards that Tribute a monster as a cost so that they also check for cards affected by LoD and set the flag if needed: we could easily add some functions to the utilities to further simplify the process, something like aux.CheckReleaseGroupCost and aux.SelectReleaseGroupCost. The main issue with this would be that many old cards would need to be updated (I'm using the Wikia to check them, the number of monsters alone is easily above 165), but I suspect it's unavoidable: I don't think we can simply override Duel.CheckReleaseGroup and Duel.SelectReleaseGroup for this, those functions are also used in situations where LoD's effect wouldn't apply and we have no way to distinguish between those cases. Does anyone have a better plan for this card?

destdev commented 6 years ago

time to resurrect myself I guess? According to this list here http://yugioh.wikia.com/wiki/Tributes_for_cost we should end up at ~500 old cards ... of course you have to exclude cards that can only tribute itself (like ABC), but even then, I doubt the number goes below ~400 or something. I gave that problem some thoughts during the past 2 days in hope to get a better solution ... unfortunately without success and I'm running out of time now, so ... sorry for not being able to contribute as much as I'd like to.

EerieCode commented 6 years ago

I finished checking all those cards yesterday. If I'm correct, the cards that tribute other monsters alone would amount to around 174 monsters + 100 Spells/Trap, for a total of 274 cards that would require an update. There are also 155 monsters that only tribute themselves, but their situation is ambiguous: I've seen some argue that, since cards like "Cosmic Flare" allow you to substitute for a Tribute cost, these costs might also be affected by Lair of Darkness, but that's something we can't know for sure until we have the rulings. Worst case scenario, we'd have 429 cards to update.

mercury233 commented 6 years ago

I agree that we should update lots of cards, and I think we can add a new parameter to CheckReleaseGroup and so on, to distinguish the reason.

EerieCode commented 6 years ago

By doing so, though, we'd have to update every single card that uses CheckReleaseGroup and similar, otherwise it could cause issues if the filter for tributes takes extra parameters. I think, by making a whole new function instead, we can at least reduce the number of scripts that will need to be changed.

mercury233 commented 6 years ago

@VanillaSalt This card is going to be released in this weekend. Can you script this card?

AndreOliveiraMendes commented 6 years ago

inst eerie doing it?

EerieCode commented 6 years ago

@mercury233 I've been working on Lair of Darkness for a while, and I managed to complete a working version yesterday. I'd rather wait until release before uploading it though, to get confirmation about self-Tributing, maintenance costs and some specific cards such as Voltanis and Tyrant Dragon.

ghost commented 6 years ago

https://github.com/Fluorohydride/ygopro-pre-script/commit/16f74ae552ec0c1bb7d973d04686ea1377a5874d https://github.com/Fluorohydride/ygopro-core/commit/21940594ad9244bcd23d2d2f714b5af457375da1 Updated. May be this problem solved.