Skip to content

Add new functions #1184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add new functions #1184

wants to merge 8 commits into from

Conversation

NaimSantos
Copy link
Contributor

Pendulum.RegisterAdditionalPendulumSummon, Pendulum.CanGainAdditionalPendulumSummon

- Adds a function to check if the player has already done a pendulum summon via the additional pendulum summon effect
- let each card register its own flag since they already have to check for it for the activation legality. Also avoids issues with D/D/D Sky King Zeus Ragnarok
@NaimSantos NaimSantos requested a review from pyrQ as a code owner May 13, 2025 15:32
@NaimSantos NaimSantos added the enhancement New feature or request label May 13, 2025
@NaimSantos
Copy link
Contributor Author

Test puzzle:

--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(66736715,0,0,LOCATION_DECK,0,POS_FACEDOWN)
Debug.AddCard(15146890,0,0,LOCATION_DECK,0,POS_FACEDOWN)

--Extra Deck (yours)
Debug.AddCard(29432356,0,0,LOCATION_EXTRA,0,POS_FACEUP)
Debug.AddCard(10731333,0,0,LOCATION_EXTRA,0,POS_FACEUP)
Debug.AddCard(1861629,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(53413628,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)
Debug.AddCard(96223501,0,0,LOCATION_EXTRA,0,POS_FACEUP)
Debug.AddCard(95401059,0,0,LOCATION_EXTRA,0,POS_FACEUP)

--Hand (yours)
Debug.AddCard(10731333,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(96223501,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(53129443,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(95401059,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(26237713,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(58308221,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(34884015,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(38120068,0,0,LOCATION_HAND,0,POS_FACEDOWN)
Debug.AddCard(89631146,0,0,LOCATION_HAND,0,POS_FACEDOWN)

--Monster Zones (yours)
Debug.AddCard(21495657,0,0,LOCATION_MZONE,4,POS_FACEUP_ATTACK,true)
Debug.AddCard(20773176,0,0,LOCATION_MZONE,3,POS_FACEUP_DEFENSE,true)
Debug.AddCard(22617205,0,0,LOCATION_MZONE,1,POS_FACEUP_DEFENSE,true)
Debug.AddCard(19302550,0,0,LOCATION_MZONE,2,POS_FACEUP_DEFENSE,true)

--Spell & Trap Zones (yours)
Debug.AddCard(97417863,0,0,LOCATION_PZONE,1,POS_FACEUP)
Debug.AddCard(28363749,0,0,LOCATION_PZONE,0,POS_FACEUP)

Debug.ReloadFieldEnd()


local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetTargetRange(LOCATION_PZONE,0)
e1:SetTarget(function(e,c) return c:IsSetCard(SET_DD) end)
e1:SetValue(13)
Duel.RegisterEffect(e1,0)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
Duel.RegisterEffect(e2,0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant