Closed XGlitchy30 closed 2 months ago
Should be able to use the Duel.GetCardTypeFromCode
function instead of all that hidden Token stuff. See the documentation here: https://projectignis.github.io/scrapi-book/api/functions/Duel/GetCardTypeFromCode.html
Fixed the following issues:
I'm not sure if this is considered improper etiquette but, since the card is being worked on, I figured I'd bring to attention here another issue with this card I reported a while back that will persist even with these changes.
The card can still be activated and will properly resolve even if the Summoned monster leaves the field before the card's activation window. Here's a puzzle code to demonstrate what I mean by summoning Reptilianne Servant.
--Created using senpaizuri's Puzzle Maker (updated by Naim & Larry126)
--Partially rewritten by edo9300
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5)
Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)
--Main Deck (yours)
Debug.AddCard(16008155,0,0,LOCATION_DECK,0,POS_FACEDOWN)
--Hand (yours)
Debug.AddCard(16008155,0,0,LOCATION_HAND,0,POS_FACEDOWN)
--Monster Zones (yours)
Debug.AddCard(79491903,0,0,LOCATION_MZONE,2,POS_FACEUP_ATTACK,true)
--Spell & Trap Zones (yours)
Debug.AddCard(1248895,0,0,LOCATION_SZONE,2,POS_FACEDOWN)
Debug.ReloadFieldEnd()
aux.BeginPuzzle()
I'm not sure if this is considered improper etiquette but, since the card is being worked on, I figured I'd bring to attention here another issue with this card I reported a while back that will persist even with these changes.
The card can still be activated and will properly resolve even if the Summoned monster leaves the field before the card's activation window. Here's a puzzle code to demonstrate what I mean by summoning Reptilianne Servant.
--Created using senpaizuri's Puzzle Maker (updated by Naim & Larry126) --Partially rewritten by edo9300 Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI,5) Debug.SetPlayerInfo(0,8000,0,0) Debug.SetPlayerInfo(1,8000,0,0) --Main Deck (yours) Debug.AddCard(16008155,0,0,LOCATION_DECK,0,POS_FACEDOWN) --Hand (yours) Debug.AddCard(16008155,0,0,LOCATION_HAND,0,POS_FACEDOWN) --Monster Zones (yours) Debug.AddCard(79491903,0,0,LOCATION_MZONE,2,POS_FACEUP_ATTACK,true) --Spell & Trap Zones (yours) Debug.AddCard(1248895,0,0,LOCATION_SZONE,2,POS_FACEDOWN) Debug.ReloadFieldEnd() aux.BeginPuzzle()
It's a bit late here so I pushed a quick fix to address this issue. I am fairly sure a simple check with Card.IsLocation in the filter should be enough for a "When" effect, but if that proves to be insufficient, I'll work out something else tomorrow once I can dedicate enough time to it.
The Normal Trap "Chain Destruction", which reads...
The following link redirects to the bug report in the official_card_rulings_bugs channel of the ProjectIgnis Discord server, where relevant replays reproducing the bugs can be found: https://discord.com/channels/170601678658076672/184324960842416129/1231661707332423761
The first problem was fixed by invoking the Card.IsRelateToEffect and Card.IsFaceup functions at the beginning of the Operation Function.
The second problem was more complex and prompted several changes regarding activation legality:
s.mdnamecheck
function inside the script. This procedure is followed if the opponent Summons a Fusion, Synchro, Xyz or Link Monster, following what was stated in the Q&A: I also made it so the names are checked even if Tokens are Summoned by the opponent, and if the monster they Summon is affected by an EFFECT_CHANGE_CODE effect (to future-proof the case of Main Deck monsters taking the name of a card that cannot be found in the hand/Main Deck).Additionally, missing Operation Info functions were added in the Target Function:
If the targeted monster is controlled by the activator, the script invokes Duel.SetOperationInfo
If the targeted monster is controlled by the opponent, the script invokes Duel.SetOperationInfo only if there exist public cards in the hand and/or Main Deck of the opponent (either because they are revealed in the hand, or because they are face-up in the Deck due to "Convulsion of Nature"). Otherwise, the script invokes Duel.SetPossibleOperationInfo.
[x] I am following the contributing guidelines.
[x] I am making the changes to modernize the scripts.